OLE2get

Syntax: @OLE2get Channel, Property ,[&] Return_value

The @OLEget command is used to get an OLE2 automation object property. The optional & (ampersand sign) defines a new channel to the sub-object.

Channel: The channel number which has been assigned by a previous call to the @OLE2open command.

Property: The name of the OLE2 automation object property.

Return_value: A variable to hold the value being returned..

Example

Using both put and get of properties

@OLE2open 'word.application' , Channel_num
@OLE2put Channel_num, 'Visible' , 1
@OLE2call Channel_num, 'Documents.Add'
@OLE2get Channel_num, 'Selection' , &Channel_num2
@OLE2call Channel_num2 , 'TypeText' , 'Hello from XpertRule'
@Rem an alternative to the above two lines could be used
via the one line shown below
@OLE2call Channel_num, 'Selection.TypeText' , 'Hello from XpertRule' 
@OLE2close Channel_num2 
@OLE2close Channel_num